import requests
import json
from love.settings import access_token

class Judge(object):
    def __init__(self):
        self.access_token=access_token
    def text_judge(self,text):
        http_='https://aip.baidubce.com/rest/2.0/antispam/v2/spam'
        res=requests.post(http_,data={'access_token':self.access_token,'content':text})
        return json.loads(res.text)



